import formatActivityV1 from '@/components/users/show/format_activity_v5';
import formatActivityV2 from '@/views/users/show/lists/activities-list/format_v2';

export const formatActivities = activities => activities.map((activity) => {
  switch (activity.version) {
    case 1: return formatActivityV1(activity);
    case 2: return formatActivityV2(activity);
    default:
      console.warn('用户动态版本出错');
      return {};
  }
});

export default formatActivities;
